export function searchValueChangeDoing(v, searchFromUrl, popupSearch, onResult) {
    axios.post(searchFromUrl, {value: v})
        .then(response => {
            const resultList = response.data.data;
            let itemList = {};
            itemList[Symbol.iterator] =
                function () {
                    let nowIndex = 0;
                    return {
                        next: function () {
                            if (nowIndex < resultList.length) {
                                return {
                                    value: resultList[nowIndex++].name,
                                    done: false
                                };
                            } else {
                                return {done: true}
                            }
                        }
                    }
                };
            itemList.length = resultList.length;
            popupSearch.value.itemList = itemList;
            popupSearch.value.clearOnClickItemCallBack();
            popupSearch.value.onClickItem = onResult(resultList);
        });
}